package knapsackProblem;

import java.util.Set;

import org.joda.time.Instant;

import almm.GeneralizedState;

public class IndividualDiscreteProcess extends almm.IndividualDiscreteProcess {

	private Instant FINISH_TIME;
	private int howManyTasks;
	private int howManyWorkers;
	/*
	public IndividualDiscreteProcess(almm.GeneralizedState initialState,
			Set<almm.GeneralizedState> generalizedStates,
			Instant FINISH_TIME, int howManyTasks) {
		
		this.FINISH_TIME = FINISH_TIME;
		this.howManyTasks = howManyTasks;
	}
*/
	public IndividualDiscreteProcess(almm.GeneralizedState initialState,
			Instant FINISH_TIME, int howManyTasks, int howManyWorkers) {
		GeneralizedStateSet.addGeneralizedState(initialState.getProperState(), initialState.getT(), FINISH_TIME, howManyTasks);

		this.FINISH_TIME = FINISH_TIME;
		this.howManyTasks = howManyTasks;
		this.howManyWorkers = howManyWorkers;
	}

	@Override
	protected almm.GeneralizedState getGeneralizedState(
			almm.ProperState properState, almm.TimeInstant t) throws Exception {
		return GeneralizedStateSet.getGeneralizedState(properState,t,this.FINISH_TIME, this.howManyTasks);
	}

	@Override
	public Set<GeneralizedState> getNotAdmissibleGeneralizedStates() {
		return GeneralizedStateSet.getNotAdmissibleStates();
	}

	@Override
	public Set<GeneralizedState> getGoalStates() {		
		return GeneralizedStateSet.getGoalStates();
	}
}